#include<stdio.h>

int main()
{
	int n,i,a[200];
	int ans=0;
	scanf("%d",&n);
	for (i=0;i<n;i++)
		scanf("%d",&a[i]);
	for (i=0;i<n;i++)
		ans=ans^a[i];
	printf("%d\n",ans);
	return 0;
}
